package com.webonn.frame.core;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

import java.io.Serializable;
import java.util.List;

@JsonIgnoreProperties(value={"start", "limit"})
public class Pagination<T> implements Serializable {
	
	private static final long serialVersionUID = 1L;
	
	private int total;
	private List<T> rows;

	@JsonIgnore
	private int start;
	@JsonIgnore
	private int limit;

	public Pagination() {
		this.total = 0;
		this.rows = null;
		this.start = 0;
		this.limit = 15;
	}

	public int getTotal() {
		return total;
	}

	public void setTotal(int total) {
		this.total = total;
	}

	public List<T> getRows() {
		return rows;
	}

	public void setRows(List<T> rows) {
		this.rows = rows;
	}

	public int getStart() {
		return start;
	}

	public void setStart(int start) {
		this.start = start;
	}

	public int getLimit() {
		return limit;
	}

	public void setLimit(int limit) {
		this.limit = limit;
	}
}
